//
//  BaseViewController.h
//  youlele
//
//  Created by wujian on 2017/12/17.
//  Copyright © 2017年 zongquankeji. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "IQKeyboardManager.h"
#import "UIViewController+Cloudox.h"
#import "UINavigationController+Cloudox.h"
#import "NetWorkNoticeView.h"
#import <DZNEmptyDataSet/UIScrollView+EmptyDataSet.h>

@interface AppBaseViewController : UIViewController


@property(nonatomic,strong)NoDataView *noDataView;

@property(nonatomic,strong)NetWorkNoticeView *netWorkView;

/**
 左标题显示
 */
-(void)showLeftTitleWithTitle:(NSString *)titleName;

/**
 左标题显示
 */
-(void)showLeftTitleWithTitle:(NSString *)titleName withColor:(UIColor *)color;

/**
 右侧图片显示
 */
-(void)showRightImageWithImageName:(NSString *)name;

/**
 坐侧图片显示
 */
-(void)showLeftImageWithImageName:(NSString *)name;
    
/**
 右侧标题显示
 */
-(void)showRightTitleWithTitle:(NSString *)titleName;

/**
 右侧标题显示自定义颜色
 */
-(void)showRightTitleWithTitle:(NSString *)titleName withColor:(UIColor *)color;


/**
 获取视频第一帧
 */
- (UIImage*) getVideoPreViewImage:(AVAsset *)asset;


/**
 显示一个目录下面的所有文件
 */
-(void)showFiles:(NSString *)path;

/**
 处理播放的Url
 */
-(NSString *)dealWithUrl:(NSString *)url;


/**
 获取视频和音频的时长
 */
- (CGFloat)getFileDuration:(NSURL*)URL;

/**
 视频输出路径
 */
- (NSURL *)exportAudioMixPath ;

/**
 *  生成图片
 *  @param color  图片颜色
 *  @param height 图片高度
 *
 *  @return 生成的图片
 */
- (UIImage*) GetImageWithColor:(UIColor*)color andHeight:(CGFloat)height;

/**
 # 变色
 */
-(NSMutableAttributedString *)attributeWithStr:(NSString *)str;

-(void)rightBtnClick;

-(void)leftBtnClick;

-(void)jumpToLogin;
@end
